Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit c9272c9218de9d12047f595c494c377142211248


Parents : 36f0c17
Author : Mark Qvist <mark@unsigned.io>
Date : 2024-10-13T13:08:10+02:00

Fixed missing byteorder argument in stamp value calculation. Fixes #21.

Changes

1 files changed, 1 insertions(+), 1 deletions(-)


Diff

diff --git a/LXMF/LXStamper.py b/LXMF/LXStamper.py
index 28cf9cd..2023ec0 100644
--- a/LXMF/LXStamper.py
+++ b/LXMF/LXStamper.py
@@ -27,7 +27,7 @@ def stamp_value(workblock, stamp):
value = 0
bits = 256
material = RNS.Identity.full_hash(workblock+stamp)
- i = int.from_bytes(material)
+ i = int.from_bytes(material, byteorder="big")
while ((i & (1 << (bits - 1))) == 0):
i = (i << 1)
value += 1


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────